package com.qzsoft.fileServers.service;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface FileService {

    /**
     * 把前端传入的文件保存到文件夹
     * @param file 文件
     * @return
     */
    public String saveSmall(MultipartFile file) throws Exception;

    /**
     *
     * @param file
     * @return
     * @throws Exception
     */
    public String saveBig(MultipartFile file) throws Exception;

    /**
     * 根据ID获取文件夹里面文件并传给请求方
     * @param id
     * @param res
     */
    public void get(String id, HttpServletResponse res) throws Exception;

    /**
     * 根据id删除文件信息
     * @param id
     * @return
     */
    public void delete(String id) throws Exception;
}
